<?php
/**
 * Yabsta News
 *
 * News list view file
 * 
 * This file is a subject under proprietary sofrware license
 * 
 * @category
 * @package
 * @subpackage
 * @author      valerii lazarevych <lazarevuch@gmail.com>
 * @copyright   Copyright(c) Valerii Lazarevych
 * @license     proprietary software license
 * @version     $Id: News.php 28.05.2012 21:04:05 valerii $
 */
?>

<h1 style='width: 150px;display:inline; float:left;'>
    <a href="<?php echo '/news'?>">News List</a>    </h1>

<div class='tags_filter' style="float:left; margin-left: 480px;margin-top: 10px;">                       
    <form method="post">    
        <input type="text" size="34" placeholder="Tags Filtering" class="placeholder news_filter" /> </form> </div>
                
<a style="float:right;margin-top:10px;" class="btn btn-success coursera-profile-button-go"  href="/editnews/0">+ A News</a>
        
<hr style="clear:both">
<div id="internal_html_page_content">             
        
  <div class="row list_title_row" style="margin-left:0px;" >
    <div style="padding-top:10px;padding-bottom:10px;">    
        <div class="span2">
            <div>
                <h3>#</h3> </div>  </div>
        
        <div class="span8" style="margin-left: 50px;">
            <div>
                <h3>
                    <div>   News    </div>    </h3>   </div>  </div>
        
        <div class="span2" style="width:200px; float:right;">
            <div>
                <h3>Tags</h3>   </div>  </div>  </div>  </div>

  <?php 
  foreach ((array)$this->newsList as $news) {?>
    
    <div class="row coursera-profile-course" style="margin-left:0px; border-bottom:solid #d9d9d9 1px;">
    <div style="padding-top:10px;padding-bottom:10px;">    
        <div class="span2">
            <div>
                <h3> <?php echo ++$i;?> </h3> </div>  </div>
        
        <div class="span8" style="margin-left: 50px;">
            <div>
                <h3>
                    <div>   
                        <a href='/editnews/<?php echo $news->getId();?>'>  <?php echo $news->newsTitle();?>    </a>    </div>    </h3>   </div>  </div>
        
        <div class="span2" style="width:200px;float:right;">
            <div>
                <h3> <?php echo $news->newsTags();?> </h3>   </div>  </div>  </div>  </div>    <?php }?>
    
    <?php if ($this->paginator != null) {?>
        <div class="pagination">
            <ul><?php                            
                foreach ( range($this->paginator->first, $this->paginator->last) as $pageNumber) {?>               
                    <li <?php echo $pageNumber == $this->paginator->current ? 'class="active"' : ''?> >
                        <a href="/news/page/<?php echo $pageNumber;?>"> 
                            <?php echo $pageNumber;?> </a> </li>    <?php }?> </ul> </div>  <?php }?>
                
</div>  <!-- id="internal_html_page_content -->